//
//  FPNewsViewCell.m
//  FilmParadise
//
//  Created by lanou3g on 15/7/13.
//  Copyright (c) 2015年 DLYgroup. All rights reserved.
//

#import "FPposterShowViewCell.h"

@implementation FPposterShowViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    CGFloat leftSpace = 20;
    CGFloat upSpace = 10;
      self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.introLabel = [[UILabel alloc]initWithFrame:CGRectMake(kImageH(leftSpace), kImageH(upSpace), kScreenWidth, kImageH(20))];
        self.introLabel.text = @"香港开机";
       // self.introLabel.backgroundColor = [UIColor greenColor];
        self.introLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_introLabel];

        [self addImage];
        self.timeLabel = [[UILabel alloc]initWithFrame:CGRectMake(kImageH(leftSpace),self.leftImageView.frame.size.height + self.leftImageView.frame.origin.y, kImageH(50), kImageH(20))];
        self.timeLabel.text = @"香港开机";
        self.timeLabel.font = [UIFont systemFontOfSize:11];
        [self.contentView addSubview:_timeLabel];
        //
        self.criticismLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.timeLabel.frame.size.width + 2 * kImageH(leftSpace), self.leftImageView.frame.size.height + self.leftImageView.frame.origin.y, kImageH(50), kImageH(20))];
        self.criticismLabel.text = @"香港开机";
        self.criticismLabel.font = [UIFont systemFontOfSize:11];
      //  self.criticismLabel.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_criticismLabel];
    
    }
    return self;
}

- (void)addImage
{
    CGFloat leftSpace = 20;
    CGFloat centreSpace = 10;
   

    CGFloat imageY = self.introLabel.frame.origin.y + self.introLabel.frame.size.height;
    CGFloat imageW = (kScreenWidth - 2 *leftSpace - 2 * centreSpace)/3;
    //左边图片
    self.leftImageView = [[UIImageView alloc]initWithFrame:CGRectMake(kImageH(leftSpace),imageY,imageW, kImageH(100))];
    self.leftImageView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:_leftImageView];
    //中间图片
    self.centreImageView = [[UIImageView alloc]initWithFrame:CGRectMake(kImageH(leftSpace) + self.leftImageView.frame.size.width + centreSpace,imageY,imageW, kImageH(100))];
    self.centreImageView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:_centreImageView];

    //右边图片
    self.rightImageView = [[UIImageView alloc]initWithFrame:CGRectMake(self.centreImageView.frame.origin.x + self.centreImageView.frame.size.width + centreSpace,imageY,imageW, kImageH(100))];
    self.rightImageView.backgroundColor = [UIColor redColor];
    [self.contentView addSubview:_rightImageView];

    
}






- (void)awakeFromNib {
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
